#include <stdio.h>

void mytestFunction(void *data)
{
    printf("%s,%d\n", __FILE__, __LINE__);
}

#define MACRO_COMMON(ENUM_VALUE, ...) ENUM_VALUE
enum MY_COMMAND_ENUM
{
    #include "macroHead.h"
};

struct MyCommamdBaseInform;
typedef void (*cmdFunc)(void *);
struct MyCommamdBaseInform
{
    int commandid;
    cmdFunc callback;
    void *data;
};

#undef MACRO_COMMON
#define MACRO_COMMON(ENUM_VALUE, func, data) {ENUM_VALUE, func, data}
struct MyCommamdBaseInform tmpdata[] = 
{
    #include "macroHead.h"
};


int main()
{
    for(int i = 0; i < ENUM_COMMAND_MAX; i++)
    {
        if(tmpdata[i].callback)
        {
            tmpdata[i].callback(tmpdata[i].data);
        }
        printf("%s,%d\n", __FILE__, __LINE__);
    }
}
